import React from "react";
import { Tabs } from "antd-mobile";
import { withRouter } from "react-router-dom";
function Cate(props) {
  const { cates } = props;
  return (
    <div>
      <Tabs
      onChange={key=>{
          props.history.push("/list?id="+key)
      }}
      >
        {cates.map((item) => {
          return (
            <Tabs.Tab title={item.catename} key={item.id}>
            </Tabs.Tab>
          );
        })}
      </Tabs>
    </div>
  );
}
export default withRouter(React.memo(Cate))
